package com.treasure.mall.zbqmallapi.vo.marketing;

import com.treasure.mall.biz.entity.marketing.RedPacketGrabLogPO;
import com.treasure.mall.biz.vo.BaseVO;
import com.treasure.mall.zbqmallapi.vo.user.UserBaseVO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/8/3
 */
@Data
@NoArgsConstructor
public class RedPacketGrabLogVO implements BaseVO {
    private static final long serialVersionUID = -8897876407724281444L;

    private Long id;
    private Long redPacketId;
    private BigDecimal amount;
    private UserBaseVO userBaseVO;

    public RedPacketGrabLogVO(RedPacketGrabLogPO po) {
        this.id = po.getId();
        this.redPacketId = po.getRedPacketId();
        this.amount = po.getAmount();
        this.userBaseVO = new UserBaseVO(po.getUserPO());
    }
}
